import request from '@/router/axios'

//分页查询未生成委外收货订单的列表
export function getUnConsignReceiptByPage(query) {
  return request({
    url: '/eims/consignReceipt/getUnConsignReceiptByPage',
    method: 'get',
    params: query
  })
}
//分页查询已生成委外收货订单列表
export function getReceiptByPage(query) {
  return request({
    url: '/eims/consignReceipt/page',
    method: 'get',
    params: query
  })
}

//统计委外收货商品的数量
export function getGoodsNumberSum(query) {
  return request({
    url: '/eims/consignReceipt/getConsignReceiptGoodsNumberSum',
    method: 'post',
    data: query
  })
}

//单条获取委外收货订单的信息
export function getConsignReceiptById(receiptId) {
  return request({
    url: '/eims/consignReceipt/' + receiptId,
    method: 'get'
  })
}
//单条获取委外未收货订单的信息
export function getUnConsignReceiptById(consignId) {
  return request({
    url: '/eims/consignReceipt/getUnConsignReceiptById/' + consignId,
    method: 'get'
  })
}

//新增委外收货订单
export function addConsignReceiptObj(obj) {
  return request({
    url: '/eims/consignReceipt',
    method: 'post',
    data: obj
  })
}

//通过id删除委外订单表
export function delDeliveryObj(id) {
  return request({
    url: '/eims/consign/' + id,
    method: 'delete'
  })
}
//修改委外订单表
export function putConsignObj(obj) {
  return request({
    url: '/eims/consign',
    method: 'put',
    data: obj
  })
}

//	根据委外收货单号查询委外收货单信息
export function checkReceiptDetailByBillId(billId) {
	return request({
		url: '/eims/consignReceipt/getConsignReceiptByBillId/' + billId,
		method: 'get'
	})
}
